package utils

const (
	SendRtcReq = iota
	CanCelRtcReq
	Crt
	Enter
	Exit
	Pub
	UnPub
	Sub
	UnSub
	ConferClose
	PlayBack
)

const (
	//登录 短信验证功能
	MsgType_Login = 0
	//修改密码 短信验证功能
	MsgType_ModifyPwd = 1
	//忘记密码 短信验证功能
	MsgType_ForgetPwd = 2
	//登录类型
	LOGIN_TEL_CODE = 3 //tel + code
	LOGIN_TEL_PWD  = 4 //tel + pwd
)

func ToString(E int) string {
	return [...]string{"SendRtcReq", "CanCelRtcReq", "Crt", "Enter", "Exit", "Pub", "UnPub", "Sub", "UnSub", "ConferClose", "PlayBack"}[E]
}

const (
	INIT = iota
	CREATED
	TERMINATED
	INVALID
	RING
)

const (
	CAPTCHA_KEY                   string = "CONFERENCE:LOGIN_CAPTCHA_KEY:"
	VERIFICATION_CODE_KEY         string = "CONFERENCE:VERIFICATION_CODE:"
	VERIFICATION_CODE_REQ_KEY     string = "CONFERENCE:VERIFICATION_REQTIME:"
	SLIDER_VERIFICATION_CODE_KEY  string = "CONFERENCE:SLIDER_VERIFICATION_CODE_"
	USER_LOGIN_TOKEN              string = "CONFERENCE:USER_LOGIN_TOKEN:"
	CONFE_WILL_START              string = "CONFERENCE:CONFER_WILL_START_"
	CONFE_NO_MAKER_URL            string = "confeNoMaker/getConfeNo"
	USER_LOGIN_TOKEN_EXPIRE_TIME  int    = 259200  // 3天
	VERIFICATION_CODE_EXPIRE_TIME        = 60 * 10 // 1分钟
	VERIFICATION_CODE_REQ_TIME           = 60
)

const (
	UserEnterConferReq    int = 1 //进入会议
	UserEnterRoomRes      int = 2 //进入会议相应
	UpdateDeviceStateReq  int = 4 //更新设备状态
	UpdateDeviceStateRes  int = 5 //更新设备状态相应
	NotifyDeviceState     int = 6 //通知设备状态变更
	CloseMsg              int = 7
	PingReq               int = 8  //ping消息
	UpdateUserNameReq     int = 10 //更新昵称
	UpdateUserNameRes     int = 11 //更新昵称相应
	NotifyUserName        int = 12 //通知更新昵称
	ConnectRes            int = 13 //连接返回
	NotifyUserConferState int = 14 //通知用户会议状态
	UserLogoutConferReq   int = 15
	CloseConferReq        int = 26 //关闭会议请求

	KickUserReq            int = 16 //踢出用户
	KickUserRes            int = 17 //踢出用户响应
	NotifyKickUser         int = 18 //通知用户被踢出
	CloseShareDesktopReq   int = 19 //关闭桌面共享
	CloseShareDesktopRes   int = 20 //关闭桌面共享响应
	NotifyCloseShare       int = 21 //通知关闭桌面共享
	WhiteBoardReq          int = 22 //白板服务请求
	WhiteBoardRes          int = 23 //白板服务响应
	NotifyWhiteBoard       int = 24 //通知白板服务
	NotifyLogOut           int = 25 //通知退出
	NotifyConferRemainTime int = 27 //通知会议剩余时间
	StartRecordReq         int = 28
	StartRecordRes         int = 29
	NotifyStartRecord      int = 30
	CloseWhiteBoardReq     int = 31
	NotifyWhiteBoardEnd    int = 32
	NotifyConferComingSoon int = 33
	NotifyRecordUrl        int = 34
	AckStartRecordReq      int = 35
	AckStartRecordRes      int = 36
	TransferModeratorReq   int = 37 //转移主持人
	NotifyTextMessage      int = 38 //群发文本消息
	NotifyUserTextMessage  int = 39 //发送文本消息给单个用户
	RecordWhiteBoard       int = 40
)

const (
	Success               int = 0
	ReqParamErr           int = 101
	DBError               int = 102
	UserNoLogin           int = 103
	UserNoRegister        int = 104
	DateNotFound          int = 105
	ServiceInternalErr    int = 106
	RemoteReqFail         int = 107
	VerifyCodeErr         int = 108
	ModifyFail            int = 109
	FileUploadErr         int = 110
	UserLoggedIn          int = 111
	AddFail               int = 112
	LogOutReasonHeartbeat int = 113
	LogOutReasonReplace   int = 114
	LogOutDisConnect      int = 115
	ISRecording           int = 116
	ISNotHost             int = 117
	TheHostNotExist       int = 118
	PasswordError         int = 119
	SendSMSError          int = 120
	MobileRegistered      int = 121
	FSControlErr          int = 122
	ReqVSCodeErr          int = 123
	ReqVSCoderepeat       int = 124
	PhoneNoErr            int = 125
	CaptchaNull           int = 126
	ConferNoExist         int = 127
)
